home *** CD-ROM | disk | FTP | other *** search
/ Digitalfoto 118 / Digitalfoto 118.iso / mac / programas / 00 / start.swf / scripts / frame_28 / DoAction.as < prev   
Text File  |  2009-11-16  |  5KB  |  176 lines

  1. function setHtmlFullscreen()
  2. {
  3.    if(html_fullscreen)
  4.    {
  5.       Stage.displayState = "normal";
  6.       html_fullscreen = false;
  7.    }
  8.    else
  9.    {
  10.       Stage.displayState = "fullScreen";
  11.       html_fullscreen = true;
  12.    }
  13. }
  14. function activateHtmlFsbtn()
  15. {
  16.    html_fs_btn.onRollOver = function()
  17.    {
  18.       this.btn_rollover_mc._alpha = 100;
  19.       if(html_fullscreen)
  20.       {
  21.          _root.toolTip(_root.tooltip_fullscreen_off,this,"right",30,-66,"top2");
  22.       }
  23.       else
  24.       {
  25.          _root.toolTip(_root.tooltip_fullscreen_on,this,"right",30,-66,"top2");
  26.       }
  27.    };
  28.    html_fs_btn.onRollOut = html_fs_btn.onReleaseOutside = html_fs_btn.onDragOut = function()
  29.    {
  30.       _root.killToolTip();
  31.       this.btn_rollover_mc._alpha = 0;
  32.    };
  33.    html_fs_btn.onRelease = function()
  34.    {
  35.       _root.killToolTip();
  36.       setHtmlFullscreen();
  37.    };
  38.    var _loc4_ = new Color(html_fs_btn.symbol);
  39.    _loc4_.setRGB(_root.parseColor(_root.btn_text_color));
  40.    html_fs_btn.btn_rollover_mc._alpha = 0;
  41.    var _loc3_ = new Color(html_fs_btn.btn_rollover_mc);
  42.    _loc3_.setRGB(_root.parseColor(_root.btn_rollover_color));
  43.    html_fs_btn._x = Stage.width - 26;
  44.    html_fs_btn._y = 2;
  45.    html_fs_btn._visible = true;
  46. }
  47. function dragmcPress()
  48. {
  49.    clickx = _root._xmouse;
  50.    if(client_os == "Mac")
  51.    {
  52.       clicky = _root._ymouse + 23;
  53.    }
  54.    else
  55.    {
  56.       clicky = _root._ymouse;
  57.    }
  58.    onMouseMove = dragger;
  59. }
  60. function dragmcRelease()
  61. {
  62.    onMouseMove = undefined;
  63.    _quality = __quality;
  64.    if(!live_mode)
  65.    {
  66.       if(this.doubleClick() == true)
  67.       {
  68.          clearInterval(singleclick_delay);
  69.          maximizeApplication();
  70.       }
  71.    }
  72. }
  73. function dragger()
  74. {
  75.    if(!maximized or live_mode)
  76.    {
  77.       _quality = "LOW";
  78.       var _loc1_ = mdm.Input.Mouse.getPosition();
  79.       var _loc3_ = _loc1_[0];
  80.       var _loc2_ = _loc1_[1];
  81.       mdm.Forms.MainForm.x = _loc3_ - clickx;
  82.       mdm.Forms.MainForm.y = _loc2_ - clicky;
  83.    }
  84. }
  85. function sizeRollover()
  86. {
  87.    Mouse.hide();
  88.    size_mc.mouse_icon_mc._visible = true;
  89. }
  90. function sizeRollout()
  91. {
  92.    Mouse.show();
  93.    size_mc.mouse_icon_mc._visible = false;
  94. }
  95. function sizemcPress()
  96. {
  97.    block_pos_listener = true;
  98.    sclickx = _root._xmouse;
  99.    sclicky = _root._ymouse;
  100.    var _loc2_ = mdm.Input.Mouse.getPosition();
  101.    dx = _loc2_[0] - mdm.Forms.MainForm.width - mdm.Forms.MainForm.x;
  102.    dy = _loc2_[1] - mdm.Forms.MainForm.height - mdm.Forms.MainForm.y;
  103.    onMouseMove = sizer;
  104.    _quality = "LOW";
  105. }
  106. function sizemcRelease()
  107. {
  108.    block_pos_listener = false;
  109.    setPos();
  110.    onMouseMove = undefined;
  111.    _quality = __quality;
  112. }
  113. function sizer()
  114. {
  115.    var _loc1_ = mdm.Input.Mouse.getPosition();
  116.    var _loc3_ = _loc1_[0];
  117.    var _loc2_ = _loc1_[1];
  118.    sizer_form_width = _loc3_ - mdm.Forms.MainForm.x - dx;
  119.    sizer_form_height = _loc2_ - mdm.Forms.MainForm.y - dy;
  120.    if(sizer_form_width < 500)
  121.    {
  122.       sizer_form_width = 500;
  123.    }
  124.    if(sizer_form_height < 50)
  125.    {
  126.       sizer_form_height = 50;
  127.    }
  128.    mdm.Forms.MainForm.width = Math.round(sizer_form_width);
  129.    mdm.Forms.MainForm.height = Math.round(sizer_form_height);
  130.    saved_premaximize_width = mdm.Forms.MainForm.width;
  131.    saved_premaximize_height = mdm.Forms.MainForm.height;
  132. }
  133. html_fs_btn._visible = false;
  134. if(_root.useFSP_path == "true")
  135. {
  136.    html_fs_btn._visible = false;
  137. }
  138. else
  139. {
  140.    html_fs_btn._visible = true;
  141.    application_border_mc._visible = false;
  142.    dragbar_mc._visible = false;
  143.    tools_mc._visible = false;
  144.    size_mc._visible = false;
  145.    application_title_op._visible = false;
  146. }
  147. application_border_mc._x = 0;
  148. application_border_mc._y = 0;
  149. application_border_mc._width = Stage.width - 1;
  150. application_border_mc._height = Stage.height - 1;
  151. dragbar_mc._width = Stage.width;
  152. dragbar_mc.useHandCursor = false;
  153. tools_mc._x = Stage.width - 53;
  154. tools_mc.minimize_mc.onRelease = function()
  155. {
  156.    minimizeApplication();
  157. };
  158. tools_mc.maximize_mc.onRelease = function()
  159. {
  160.    maximizeApplication();
  161. };
  162. tools_mc.quit_mc.onRelease = function()
  163. {
  164.    renderExit();
  165. };
  166. var clickx;
  167. var clicky;
  168. dragbar_mc.onPress = mx.utils.Delegate.create(this,dragmcPress);
  169. dragbar_mc.onReleaseOutside = dragbar_mc.onRelease = mx.utils.Delegate.create(this,dragmcRelease);
  170. var sclickx;
  171. var sclicky;
  172. size_mc.onPress = mx.utils.Delegate.create(this,sizemcPress);
  173. size_mc.onReleaseOutside = size_mc.onRelease = mx.utils.Delegate.create(this,sizemcRelease);
  174. var dx = 0;
  175. var dy = 0;
  176.